class AccessTokenEntity {
  String errcode;
  String errmsg;
  String openid;
  String accessToken;
  int expiresIn;
  String refreshToken;
  String scope;
  String unionid;

  AccessTokenEntity(
      {this.errcode,
      this.errmsg,
      this.openid,
      this.accessToken,
      this.expiresIn,
      this.refreshToken,
      this.unionid,
      this.scope});

  AccessTokenEntity.fromJson(Map<String, dynamic> json) {
    errcode = json['errcode'];
    errmsg = json['errmsg'];
    openid = json['openid'];
    accessToken = json['access_token'];
    expiresIn = json['expires_in'];
    refreshToken = json['refresh_token'];
    scope = json['scope'];
    unionid = json['unionid'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['errcode'] = this.errcode;
    data['errmsg'] = this.errmsg;
    data['openid'] = this.openid;
    data['access_token'] = this.accessToken;
    data['expires_in'] = this.expiresIn;
    data['refresh_token'] = this.refreshToken;
    data['scope'] = this.scope;
    data['unionid'] = this.unionid;
    return data;
  }
}
